package com.lyf.shop.dao;

import com.lyf.shop.entity.Page;
import com.lyf.shop.entity.Product;
import com.lyf.shop.entity.Type;

import java.sql.SQLException;
import java.util.List;

public interface ProductDao {
    //使用类别id获取商品的总行数
    Long getCountByTid(int tid) throws SQLException;
    //按照商品分类进行商品查询
    List<Product> getProListByTid(int tid,Page page) throws SQLException;
    //通过主键查找单个商品
    Product getProById(int pid) throws SQLException;


    List<Product> getProListByKey(String pname,String ptime) throws SQLException;

    int addPro(Product product) throws SQLException;

}
